package com.itqf.beanfactory;

import com.itqf.config.AnnotationConfig;
import com.itqf.pojo.Student;
import com.itqf.pojo.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * projectName: springframeworkgp8
 *
 * @author: 赵伟风
 * time: 2021/8/3 9:55
 * description:
 */
public class AnnotationFactory2 {

    public static void main(String[] args) {


        AnnotationConfigApplicationContext applicationContext
                = new AnnotationConfigApplicationContext(AnnotationConfig.class);

        Student student = applicationContext.getBean(Student.class);


        System.out.println("student = " + student);


        User bean = applicationContext.getBean(User.class);

        System.out.println("bean = " + bean);

    }

}
